<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--
     对象的简化写法
     属性的值是一个变量  属性名和变量名一致  则可以只写一个
     方法的定义
-->

<script>

  let name = 'lisi'
  let age = 20

  let user = {
    name,
    age,
    say(){
      console.log('说话')
    }
  }

  console.log(user.name)
  console.log(user.age)
  user.say()



</script>
</body>
</html>